﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Threading.Tasks;
//using Microsoft.AspNetCore.Mvc;
//using Admin.CYT369.Com.WebBase;

//namespace news.admin.cyt369.com.Areas.NewsAdmin.Controllers
//{
//    public partial class MediaSourceController
//    {
//        [HttpGet]
//        public JsonResult GetMediaSources()
//        {
//            int page = Request.Query.GetInteger("page", 0);
//            int rows = Request.Query.GetInteger("rows", 20);
//            int total = 0;

//            var auditStatusId = Request.Query.GetInteger("AuditStatus");
//            string name = Request.Query.GetString("Name");

//            var items = news.admin.cyt369.com.services.Services.MediaSourceService.Instance.GetMediaSources(page, rows, ref total, name, auditStatusId);

//            return DefaultJson(new { total = total, rows = items });
//        }


//        [HttpGet]
//        public JsonResult GetMediaSourceByID(long id)
//        {
//            var category = news.admin.cyt369.com.services.Services.MediaSourceService.Instance.GetMediaSourceByID(id);

//            return DefaultJson(category);
//        }


//        [HttpPost]
//        public IActionResult DoMediaSourceAudit()
//        {
//            var auditRemark = Request.Form.GetString("AuditRemark");
//            var id = Request.Form.GetLong("Id", 0);
//            var result = Request.Form.GetBoolean("Result", false);
//            /// 是否审核通过: 0-审核未通过，1-通过审核
//            if (news.admin.cyt369.com.services.Services.MediaSourceService.Instance.DoMediaSourceAudit(id, (result ? 1 : 0), this.GetUserId(), auditRemark))
//            {
//                return Ok();
//            }

//            return BadRequest("保存审核失败");
//        }

//    }
//}